//Background
BGbush=("\script\Images\3DBackground\Stage 1\Bush.png");
BGpath=("\script\Images\3DBackground\Stage 1\Path.png");
BGtrees=("\script\Images\3DBackground\Stage 1\Trees.png");
BGcanopy1=("\script\Images\3DBackground\Stage 1\Canopy1.png");
BGcanopy2=("\script\Images\3DBackground\Stage 1\Canopy2.png");
BGcanopy3=("\script\Images\3DBackground\Stage 1\Canopy3.png");
BGceiling=("\script\Images\3DBackground\Stage 1\Ceiling.png");

BGlightray=("\script\Images\3DBackground\Lightray.png");
BGend=("\script\Images\3DBackground\Wall.png");
BGleaf=("\script\Images\3DBackground\Leaf.png");

let i=0;
loop(25){
bushscroll=bushscroll~[0]; bush=bush~[0]; canopyscroll=canopyscroll~[0];
canopy=canopy~[0]; canopysprite+=rand_int(1,2); if(canopysprite>3){ canopysprite-=3; }
canopygraphic=canopygraphic~[canopysprite];
bushrandomx=bushrandomx~[0]; bushrandomx[i]=randombush1;
i++;
}

SetCommonData("InEvent",0);
SetCommonData("BackgroundStop",0);
SetCommonData("Stage",1);
SetCommonData("PlayMusic",1);

SetCommonData("NotSwitchedElements",0);

bgphase=1;
hscroll=0; vscroll=0; scroll=0;
scrollon=1; scrollspeed=1;

oldscore=GetScore;

time=0; frame=0;
phase=0; stagephase=1;

basev=100;

CreateEnemyFromFile("script\Functions\fadein.txt",0,0,0,0,0);
CreateEnemyFromFile("script\Functions\itemline.txt",0,0,0,0,0);